Optimal. Leaf size=255 \[ \frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {(A b-a B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b \left (a^2-b^2\right ) d}+\frac {\left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^2 (a+b)^2 d}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.62, antiderivative size = 255, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 8, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.242, Rules used = {3033, 3079,
3134, 3138, 2719, 3081, 2720, 2884} \begin {gather*} \frac {(A b-a B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b d \left (a^2-b^2\right )}+\frac {\left (-3 a^2 B+a A b+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 d \left (a^2-b^2\right )}-\frac {\left (-3 a^2 B+a A b+2 b^2 B\right ) \sin (c+d x)}{b^2 d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b d \left (a^2-b^2\right ) \sqrt {\cos (c+d x)} (a \cos (c+d x)+b)}+\frac {\left (-3 a^3 B+a^2 A b+5 a b^2 B-3 A b^3\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 d (a-b) (a+b)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2719
Rule 2720
Rule 2884
Rule 3033
Rule 3079
Rule 3081
Rule 3134
Rule 3138
Rubi steps
\begin {align*} \int \frac {A+B \sec (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+b \sec (c+d x))^2} \, dx &=\int \frac {B+A \cos (c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))^2} \, dx\\ &=\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}-\frac {\int \frac {\frac {1}{2} \left (a A b-3 a^2 B+2 b^2 B\right )+b (A b-a B) \cos (c+d x)-\frac {1}{2} a (A b-a B) \cos ^2(c+d x)}{\cos ^{\frac {3}{2}}(c+d x) (b+a \cos (c+d x))} \, dx}{b \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}-\frac {2 \int \frac {\frac {1}{4} \left (-a^2 A b+2 A b^3+3 a^3 B-4 a b^2 B\right )-\frac {1}{2} b \left (a A b-2 a^2 B+b^2 B\right ) \cos (c+d x)-\frac {1}{4} a \left (a A b-3 a^2 B+2 b^2 B\right ) \cos ^2(c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{b^2 \left (a^2-b^2\right )}\\ &=-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}+\frac {2 \int \frac {\frac {1}{4} a \left (a^2 A b-2 A b^3-3 a^3 B+4 a b^2 B\right )+\frac {1}{4} a^2 b (A b-a B) \cos (c+d x)}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{a b^2 \left (a^2-b^2\right )}+\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \int \sqrt {\cos (c+d x)} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}+\frac {(A b-a B) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{2 b \left (a^2-b^2\right )}+\frac {\left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \int \frac {1}{\sqrt {\cos (c+d x)} (b+a \cos (c+d x))} \, dx}{2 b^2 \left (a^2-b^2\right )}\\ &=\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b^2 \left (a^2-b^2\right ) d}+\frac {(A b-a B) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{b \left (a^2-b^2\right ) d}+\frac {\left (a^2 A b-3 A b^3-3 a^3 B+5 a b^2 B\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{(a-b) b^2 (a+b)^2 d}-\frac {\left (a A b-3 a^2 B+2 b^2 B\right ) \sin (c+d x)}{b^2 \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)}}+\frac {a (A b-a B) \sin (c+d x)}{b \left (a^2-b^2\right ) d \sqrt {\cos (c+d x)} (b+a \cos (c+d x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 14.43, size = 317, normalized size = 1.24 \begin {gather*} \frac {-\frac {\frac {2 \left (-3 a^2 A b+4 A b^3+9 a^3 B-10 a b^2 B\right ) \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )}{a+b}-\frac {8 b \left (a A b-2 a^2 B+b^2 B\right ) \left ((a+b) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )-b \Pi \left (\frac {2 a}{a+b};\left .\frac {1}{2} (c+d x)\right |2\right )\right )}{a (a+b)}+\frac {2 \left (-a A b+3 a^2 B-2 b^2 B\right ) \left (-2 a b E\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+2 b (a+b) F\left (\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )+\left (a^2-2 b^2\right ) \Pi \left (-\frac {a}{b};\left .\text {ArcSin}\left (\sqrt {\cos (c+d x)}\right )\right |-1\right )\right ) \sin (c+d x)}{a b \sqrt {\sin ^2(c+d x)}}}{(a-b) (a+b)}+4 \sqrt {\cos (c+d x)} \left (\frac {a^2 (-A b+a B) \sin (c+d x)}{\left (a^2-b^2\right ) (b+a \cos (c+d x))}+2 B \tan (c+d x)\right )}{4 b^2 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(849\) vs.
\(2(329)=658\).
time = 6.09, size = 850, normalized size = 3.33
method | result | size |
default | \(\text {Expression too large to display}\) | \(850\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+\frac {b}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________